
package File;

import java.io.File;

public class File_demo {
    public File_demo() {
    }

    public static void main(String[] args) {
        String str = "D:\\文档\\JAVA\\项目文件\\PokerGame\\image\\login\\注册按下.png";
        File file = new File(str);
        System.out.println(file);
        String parent1 = "D:\\文档\\JAVA\\项目文件\\PokerGame\\image\\login";
        String child1 = "注册按下.png";
        file = new File(parent1, child1);
        System.out.println(file);
        file = new File(parent1 + "\\" + child1);
        System.out.println(file);
        File parent2 = new File("D:\\文档\\JAVA\\项目文件\\PokerGame\\image\\login");
        file = new File(parent2, child1);
        System.out.println(file);
    }
}
